package org.csu.mypetstore.persistence;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.csu.mypetstore.domain.Sequence;
import org.springframework.stereotype.Repository;

@Repository
public interface SequenceMapper {
    @Select("        SELECT name, nextid\n" +
            "        FROM SEQUENCE\n" +
            "        WHERE NAME = #{name}")
    Sequence getSequence(Sequence var1);

    @Update("        UPDATE SEQUENCE\n" +
            "        SET NEXTID = #{nextId}\n" +
            "        WHERE NAME = #{name}")
    boolean updateSequence(Sequence var1);
}
